<template>
    <div>

        <button @click="change">改变文字</button>
    </div>

</template>

<script>
    //---------------引入继承的组件-----------------//
    import Vue from "vue"
    import confirm from './index.js'
    Vue.use(confirm)
    export default {
        methods: {
            change() {
                this.confirm('哈哈哈哈').then(() => {
                    alert("点了ok")
                }).catch(() => {
                    alert("点了esc")
                })
            },
        }

    }
</script>

<style>

</style>